//
//  HomeNewCycleHeaderView.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/8.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "HomeNewCycleHeaderView.h"
#import "RunLabelView.h"

@implementation HomeNewCycleHeaderView

-(instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
        GLGWView * bangkGroundView = [[GLGWView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, kHeightProportion_In_iPhoneTriploid(87)) inSuperView:self];
        bangkGroundView.backgroundColor = [UIColor whiteColor];
        //
        GLGWView * bg_View = [[GLGWView alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(15), KScreenWidth-kWidthProportion_In_iPhoneTriploid(30), kHeightProportion_In_iPhoneTriploid(60)) inSuperView:bangkGroundView];
        [bg_View setViewShadowWidth:3.0 theCornerRadius:3.0];
        bg_View.backgroundColor = [UIColor whiteColor];
        //
        GLGWImageView * touTiaoImageView = [[GLGWImageView alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(21), kHeightProportion_In_iPhoneTriploid(10), kWidthProportion_In_iPhoneTriploid(40), kHeightProportion_In_iPhoneTriploid(20)) imageName:@"home_Top" inSuperView:bg_View];
        //
        GLGWLabel * glgwLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(10), kY_With_View(touTiaoImageView, 5), kWidthProportion_In_iPhoneTriploid(60), kHeightProportion_In_iPhoneTriploid(16)) theFont:SYSTEMFONT(11) theColor:[UIColor whiteColor] inSuperView:bg_View];
        glgwLabel.text = @"钢来钢往";
        glgwLabel.textAlignment = NSTextAlignmentCenter;
        glgwLabel.layer.cornerRadius = kHeightProportion_In_iPhoneTriploid(8);
        glgwLabel.layer.masksToBounds = YES;
        glgwLabel.backgroundColor = kColor_Rule_Yellow;
        //
        RunLabelView * runView = [[RunLabelView alloc] initWithFrame:CGRectMake(kX_With_View(glgwLabel, 0), kHeightProportion_In_iPhoneTriploid(5), bg_View.width - kX_With_View(glgwLabel, 40), kHeightProportion_In_iPhoneTriploid(50)) inSuperView:bg_View];
        runView.messageArray = @[@"1、库里43分，勇士吊打骑士",@"2、伦纳德死亡缠绕詹姆斯，马刺大胜骑士",@"3、乐福致命失误，骑士惨遭5连败",@"4、五小阵容发威，雄鹿吊打骑士", @"5、天猫的双十一，然而并没卵用"];
        runView.bgColor = [UIColor whiteColor];
        [runView setScrollDuration:0.5 stayDuration:2];
        [runView changeTapMarqueeAction:^(NSInteger index) {
            NSLog(@"你点击了第 %ld 个button！", index);
            
        }];
        [runView start];
        
    }
    return self;
}

@end
